package net.maku.module.dao;

import net.maku.framework.mybatis.dao.BaseDao;
import net.maku.module.entity.AgCategoryEntity;
import net.maku.module.vo.AgCategoryVO;
import net.maku.system.entity.SysUserEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
import java.util.Set;

@Mapper
public interface AgCategoryDao extends BaseDao<AgCategoryEntity> {
    List<Map<Integer, Map<String, String>>> getUserNamesForCategories(List<Long> categoryIds);

    List<SysUserEntity> selectUserBatchIds(@Param("userIds") Set<Long> userIds);

    String getUpdateName(Long updater);

    String getCreateName(Long creator);

    List<AgCategoryVO> findByParentIdAndWebsiteIdOrderBySortAsc(int i, Integer websiteId);

    String getParentName(Integer parentId);

    List<AgCategoryVO> findAllByWebsiteIdOrderBySortAsc(@Param("websiteId") Integer websiteId);

    int updateCategoryImage(Long categoryId, String url);
}
